package com.cc.serive.impl;

import com.cc.entity.User;
import com.cc.feign.UserFeign;
import com.cc.serive.AuthService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @program:
 * @ClassName:
 * @description:
 * @author: zgc
 * @date:
 * @Version 1.0
 **/
@Service
public class AuthServiceImpl implements AuthService {
    @Resource
    private UserFeign userFeign;

    @Override
    //@Cacheable(value = "AuthLogin", key = "'account:' + #accountName + ':' + #password")
    public User authLogin(String accountName, String password) {
       // String url = "http://User-server/login?username="+accountName+"&password="+password;
       // String result = restTemplate.getForObject(url, String.class);
        User result = userFeign.login(accountName, password);
        return result;
    }


}
